/***
*
* File: wp_savedata.nut
* Auth: Damian Wojdat
* Date: 20.10.2012
* Desc: Data saving functions.
*
*************************************************************************************************************/

//dofile("scripts/wp_vars.nut", true);

function savePlayerData(playerid, column)
{
	local string;
	if(column.tostring() == "exitdata")
	{
		string = "UPDATE " + MYSQL_IVMP_USERS + " Set posX = '" + pData[playerid].posX.tofloat() + "' , posY = '" + pData[playerid].posY.tofloat() + "' , posZ = '" + pData[playerid].posZ.tofloat() + "' , posAngle = '" + pData[playerid].posAngle.tofloat() + 
		"' , totalKills = '" + pData[playerid].totalKills + "' , totalDeaths = '" + pData[playerid].totalDeaths + " , points = '" + pData[playerid].points + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posX")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET posX = '" + pData[playerid].posX.tofloat() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posY")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET posY = '" + pData[playerid].posY.tofloat() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posZ")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET posZ = '" + pData[playerid].posZ.tofloat() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET skin = '" + pData[playerid].skin.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "cash")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET cash = '" + pData[playerid].cash.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "permsLvl")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET permsLvl = '" + pData[playerid].permsLvl.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "adminDuty")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET adminDuty = '" + pData[playerid].adminDuty.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "registered")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET registered = '" + pData[playerid].registered.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "name")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET name = '" + pData[playerid].name.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "banned")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET banned = '" + pData[playerid].banned.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "warns")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET warns = '" + pData[playerid].warns.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "warnCooldown")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET warnCooldown = '" + pData[playerid].warnCooldown.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posAngle")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET posAngle = '" + pData[playerid].posAngle.tofloat() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "crashed")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET crashed = '" + pData[playerid].crashed.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "muted")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET muted = '" + pData[playerid].muted.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "points")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET points = '" + pData[playerid].points.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "tutorial")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET tutorial = '" + pData[playerid].tutorial.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "characterDying")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET characterDying = '" + pData[playerid].characterDying.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "characterDeath")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET characterDeath = '" + pData[playerid].characterDeath.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "health")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET health = '" + pData[playerid].health.tofloat() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "age")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET age = '" + pData[playerid].age.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "logged")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET logged = '" + pData[playerid].logged.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		
		if(pData[playerid].logged.tointeger() == 0)
		{
			try 
			{ 
				delete pData[playerid]; 
			}
			catch(e)
			{ 
				log(string); 
			}
		}
		return 1;
	}
	if(column.tostring() == "sex")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET sex = '" + pData[playerid].sex.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "playingHours")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET playingHours = '" + pData[playerid].playingHours.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "playingHoursHelper")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET playingHoursHelper = '" + pData[playerid].playingHoursHelper.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "loginsCount")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET loginsCount = '" + pData[playerid].loginsCount.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "faction1")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET faction1 = '" + pData[playerid].faction1.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "faction1Rank")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET faction1Rank = '" + pData[playerid].faction1Rank.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "carLic")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET carLic = '" + pData[playerid].carLic.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "boatLic")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET boatLic = '" + pData[playerid].boatLic.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "heliLic")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET heliLic = '" + pData[playerid].heliLic.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "weaponLic")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET weaponLic = '" + pData[playerid].weaponLic.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "fishLic")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET fishLic = '" + pData[playerid].fishLic.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "jailed")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET jailed = '" + pData[playerid].jailed.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "jailTime")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET jailTime = '" + pData[playerid].jailTime.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "costs")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET costs = '" + pData[playerid].costs.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "ticket")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS + " SET ticket = '" + pData[playerid].ticket.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item1")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item1 = '" + pData[playerid].item1.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item1type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item1type = '" + pData[playerid].item1type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item1option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item1option = '" + pData[playerid].item1option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item1option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item1option2 = '" + pData[playerid].item1option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item1option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item1option3 = '" + pData[playerid].item1option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item1option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item1option4 = '" + pData[playerid].item1option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item1option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item1option5 = '" + pData[playerid].item1option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item1option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item1option6 = '" + pData[playerid].item1option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item2 = '" + pData[playerid].item2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item2type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item2type = '" + pData[playerid].item2type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item2option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item2option = '" + pData[playerid].item2option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item2option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item2option2 = '" + pData[playerid].item2option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item2option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item2option3 = '" + pData[playerid].item2option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item2option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item2option4 = '" + pData[playerid].item2option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item2option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item2option5 = '" + pData[playerid].item2option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item2option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item2option6 = '" + pData[playerid].item2option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item3 = '" + pData[playerid].item3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item3type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item3type = '" + pData[playerid].item3type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item3option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item3option = '" + pData[playerid].item3option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item3option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item3option2 = '" + pData[playerid].item3option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item3option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item3option3 = '" + pData[playerid].item3option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item3option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item3option4 = '" + pData[playerid].item3option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item3option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item3option5 = '" + pData[playerid].item3option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item3option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item3option6 = '" + pData[playerid].item3option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item4 = '" + pData[playerid].item4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item4type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item4type = '" + pData[playerid].item4type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item4option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item4option = '" + pData[playerid].item4option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item4option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item4option2 = '" + pData[playerid].item4option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item4option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item4option3 = '" + pData[playerid].item4option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item4option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item4option4 = '" + pData[playerid].item4option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item4option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item4option5 = '" + pData[playerid].item4option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item4option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item4option6 = '" + pData[playerid].item4option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item5 = '" + pData[playerid].item5.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item5type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item5type = '" + pData[playerid].item5type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item5option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item5option = '" + pData[playerid].item5option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item5option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item5option2 = '" + pData[playerid].item5option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item5option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item5option3 = '" + pData[playerid].item5option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item5option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item5option4 = '" + pData[playerid].item5option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item5option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item5option5 = '" + pData[playerid].item5option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item5option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item5option6 = '" + pData[playerid].item5option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item6 = '" + pData[playerid].item6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item6type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item6type = '" + pData[playerid].item6type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item6option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item6option = '" + pData[playerid].item6option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item6option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item6option2 = '" + pData[playerid].item6option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item6option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item6option3 = '" + pData[playerid].item6option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item6option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item6option4 = '" + pData[playerid].item6option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item6option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item6option5 = '" + pData[playerid].item6option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item6option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item6option6 = '" + pData[playerid].item6option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item7")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item7 = '" + pData[playerid].item7.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item7type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item7type = '" + pData[playerid].item7type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item7option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item7option = '" + pData[playerid].item7option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item7option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item7option2 = '" + pData[playerid].item7option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item7option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item7option3 = '" + pData[playerid].item7option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item7option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item7option4 = '" + pData[playerid].item7option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item7option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item7option5 = '" + pData[playerid].item7option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item7option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item7option6 = '" + pData[playerid].item7option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item8")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item8 = '" + pData[playerid].item8.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item8type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item8type = '" + pData[playerid].item8type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item8option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item8option = '" + pData[playerid].item8option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item8option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item8option2 = '" + pData[playerid].item8option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item8option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item8option3 = '" + pData[playerid].item8option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item8option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item8option4 = '" + pData[playerid].item8option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item8option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item8option5 = '" + pData[playerid].item8option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item8option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item8option6 = '" + pData[playerid].item8option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item9")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item9 = '" + pData[playerid].item9.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item9type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item9type = '" + pData[playerid].item9type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item9option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item9option = '" + pData[playerid].item9option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item9option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item9option2 = '" + pData[playerid].item9option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item9option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item9option3 = '" + pData[playerid].item9option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item9option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item9option4 = '" + pData[playerid].item9option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item9option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item9option5 = '" + pData[playerid].item9option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item9option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item9option6 = '" + pData[playerid].item9option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item10")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item10 = '" + pData[playerid].item10.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item10type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item10type = '" + pData[playerid].item10type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item10option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item10option = '" + pData[playerid].item10option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item10option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item10option2 = '" + pData[playerid].item10option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item10option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item10option3 = '" + pData[playerid].item10option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item10option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item10option4 = '" + pData[playerid].item10option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item10option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item10option5 = '" + pData[playerid].item10option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item10option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item10option6 = '" + pData[playerid].item10option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item11")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item11 = '" + pData[playerid].item11.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item11type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item11type = '" + pData[playerid].item11type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item11option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item11option = '" + pData[playerid].item11option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item11option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item11option2 = '" + pData[playerid].item11option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item11option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item11option3 = '" + pData[playerid].item11option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item11option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item11option4 = '" + pData[playerid].item11option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item11option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item11option5 = '" + pData[playerid].item11option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item11option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item11option6 = '" + pData[playerid].item11option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item12")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item12 = '" + pData[playerid].item12.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item12type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item12type = '" + pData[playerid].item12type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item12option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item12option = '" + pData[playerid].item12option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item12option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item12option2 = '" + pData[playerid].item12option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item12option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item12option3 = '" + pData[playerid].item12option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item12option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item12option4 = '" + pData[playerid].item12option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item12option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item12option5 = '" + pData[playerid].item12option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item12option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item12option6 = '" + pData[playerid].item12option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item13")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item13 = '" + pData[playerid].item13.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item13type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item13type = '" + pData[playerid].item13type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item13option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item13option = '" + pData[playerid].item13option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item13option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item13option2 = '" + pData[playerid].item13option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item13option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item13option3 = '" + pData[playerid].item13option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item13option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item13option4 = '" + pData[playerid].item13option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item13option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item13option5 = '" + pData[playerid].item13option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item13option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item13option6 = '" + pData[playerid].item13option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item14")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item14 = '" + pData[playerid].item14.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item14type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item14type = '" + pData[playerid].item14type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item14option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item14option = '" + pData[playerid].item14option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item14option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item14option2 = '" + pData[playerid].item14option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item14option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item14option3 = '" + pData[playerid].item14option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item14option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item14option4 = '" + pData[playerid].item14option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item14option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item14option5 = '" + pData[playerid].item14option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item14option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item14option6 = '" + pData[playerid].item14option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item15")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item15 = '" + pData[playerid].item15.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item15type")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item15type = '" + pData[playerid].item15type.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item15option")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item15option = '" + pData[playerid].item15option.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item15option2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item15option2 = '" + pData[playerid].item15option2.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item15option3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item15option3 = '" + pData[playerid].item15option3.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item15option4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item15option4 = '" + pData[playerid].item15option4.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item15option5")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item15option5 = '" + pData[playerid].item15option5.tostring() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item15option6")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_USERS_ITEMS + " SET item15option6 = '" + pData[playerid].item15option6.tointeger() + "' WHERE name = '" + pData[playerid].name.tostring() + "'";
		sql.query(string);
		return 1;
	}
	log("[WARNING:] Unknown column name: " + column);
	return 1;
}

function saveBData(bID, column)
{
	local string;
	local dBID = bID + 1;
	if(column.tostring() == "name")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET name = '" + bData[bID].name.tostring() + "' WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "owner")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET owner = '" + bData[bID].owner + "' WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "owned")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET owned = '" + bData[bID].owned + "' WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "interior")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET interior = '" + bData[bID].interior + "' WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posEntrance")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET posXEntrance = '" + bData[bID].posXEntrance.tofloat() + "' , posYEntrance = '" + bData[bID].posYEntrance.tofloat() + "' , posZEntrance = '" +  bData[bID].posZEntrance.tofloat() + "' WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posAngleEntrance")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET posAngleEntrance = '" + bData[bID].posAngleEntrance.tofloat() + "' WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posExit")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET posXExit = '" + bData[bID].posXExit.tofloat() + "' , posYExit = '" + bData[bID].posXExit.tofloat() + "' , posZExit = '" + bData[bID].posZExit.tofloat() + "' WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posAngleExit")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET posAngleExit = '" + bData[bID].posAngleExit.tofloat() + "' WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "type")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET type = '" + bData[bID].type + "' WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "faction1")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET faction = '" + bData[bID].faction1 + "' WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item1")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item1 = '" + bData[bID].item1 + "' , item1type = '" + bData[bID].item1type + "' , item1option = '" + bData[bID].item1option + "' , item1option2 = '" + bData[bID].item1option2 + "' , item1option3 = '" + bData[bID].item1 + "' , item1option4 = '" + bData[bID].item1option4 + "' , item1option5 = '" + bData[bID].item1option5.tostring() + "' , item1option6 = '" + bData[bID].item1option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item2")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item2 = '" + bData[bID].item2 + "' , item2type = '" + bData[bID].item2type + "' , item2option = '" + bData[bID].item2option + "' , item2option2 = '" + bData[bID].item2option2 + "' , item2option3 = '" + bData[bID].item2 + "' , item2option4 = '" + bData[bID].item2option4 + "' , item2option5 = '" + bData[bID].item2option5.tostring() + "' , item2option6 = '" + bData[bID].item2option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item3")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item3 = '" + bData[bID].item3 + "' , item3type = '" + bData[bID].item3type + "' , item3option = '" + bData[bID].item3option + "' , item3option2 = '" + bData[bID].item3option2 + "' , item3option3 = '" + bData[bID].item3 + "' , item3option4 = '" + bData[bID].item3option4 + "' , item3option5 = '" + bData[bID].item3option5.tostring() + "' , item3option6 = '" + bData[bID].item3option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item4")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item4 = '" + bData[bID].item4 + "' , item4type = '" + bData[bID].item4type + "' , item4option = '" + bData[bID].item4option + "' , item4option2 = '" + bData[bID].item4option2 + "' , item4option3 = '" + bData[bID].item4 + "' , item4option4 = '" + bData[bID].item4option4 + "' , item4option5 = '" + bData[bID].item4option5.tostring() + "' , item4option6 = '" + bData[bID].item4option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item5")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item5 = '" + bData[bID].item5 + "' , item5type = '" + bData[bID].item5type + "' , item5option = '" + bData[bID].item5option + "' , item5option2 = '" + bData[bID].item5option2 + "' , item5option3 = '" + bData[bID].item5 + "' , item5option4 = '" + bData[bID].item5option4 + "' , item5option5 = '" + bData[bID].item5option5.tostring() + "' , item5option6 = '" + bData[bID].item5option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item6")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item6 = '" + bData[bID].item6 + "' , item6type = '" + bData[bID].item6type + "' , item6option = '" + bData[bID].item6option + "' , item6option2 = '" + bData[bID].item6option2 + "' , item6option3 = '" + bData[bID].item6 + "' , item6option4 = '" + bData[bID].item6option4 + "' , item6option5 = '" + bData[bID].item6option5.tostring() + "' , item6option6 = '" + bData[bID].item6option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item7")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item7 = '" + bData[bID].item7 + "' , item7type = '" + bData[bID].item7type + "' , item7option = '" + bData[bID].item7option + "' , item7option2 = '" + bData[bID].item7option2 + "' , item7option3 = '" + bData[bID].item7 + "' , item7option4 = '" + bData[bID].item7option4 + "' , item7option5 = '" + bData[bID].item7option5.tostring() + "' , item7option6 = '" + bData[bID].item7option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item8")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item8 = '" + bData[bID].item8 + "' , item8type = '" + bData[bID].item8type + "' , item8option = '" + bData[bID].item8option + "' , item8option2 = '" + bData[bID].item8option2 + "' , item8option3 = '" + bData[bID].item8 + "' , item8option4 = '" + bData[bID].item8option4 + "' , item8option5 = '" + bData[bID].item8option5.tostring() + "' , item8option6 = '" + bData[bID].item8option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item9")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item9 = '" + bData[bID].item9 + "' , item9type = '" + bData[bID].item9type + "' , item9option = '" + bData[bID].item9option + "' , item9option2 = '" + bData[bID].item9option2 + "' , item9option3 = '" + bData[bID].item9 + "' , item9option4 = '" + bData[bID].item9option4 + "' , item9option5 = '" + bData[bID].item9option5.tostring() + "' , item9option6 = '" + bData[bID].item9option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item10")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item10 = '" + bData[bID].item10 + "' , item10type = '" + bData[bID].item10type + "' , item10option = '" + bData[bID].item10option + "' , item10option2 = '" + bData[bID].item10option2 + "' , item10option3 = '" + bData[bID].item10 + "' , item10option4 = '" + bData[bID].item10option4 + "' , item10option5 = '" + bData[bID].item10option5.tostring() + "' , item10option6 = '" + bData[bID].item10option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item11")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item11 = '" + bData[bID].item11 + "' , item11type = '" + bData[bID].item11type + "' , item11option = '" + bData[bID].item11option + "' , item11option2 = '" + bData[bID].item11option2 + "' , item11option3 = '" + bData[bID].item11 + "' , item11option4 = '" + bData[bID].item11option4 + "' , item11option5 = '" + bData[bID].item11option5.tostring() + "' , item11option6 = '" + bData[bID].item11option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item12")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item12 = '" + bData[bID].item12 + "' , item12type = '" + bData[bID].item12type + "' , item12option = '" + bData[bID].item12option + "' , item12option2 = '" + bData[bID].item12option2 + "' , item12option3 = '" + bData[bID].item12 + "' , item12option4 = '" + bData[bID].item12option4 + "' , item12option5 = '" + bData[bID].item12option5.tostring() + "' , item12option6 = '" + bData[bID].item12option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item13")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item13 = '" + bData[bID].item13 + "' , item13type = '" + bData[bID].item13type + "' , item13option = '" + bData[bID].item13option + "' , item13option2 = '" + bData[bID].item13option2 + "' , item13option3 = '" + bData[bID].item13 + "' , item13option4 = '" + bData[bID].item13option4 + "' , item13option5 = '" + bData[bID].item13option5.tostring() + "' , item13option6 = '" + bData[bID].item13option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item14")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item14 = '" + bData[bID].item14 + "' , item14type = '" + bData[bID].item14type + "' , item14option = '" + bData[bID].item14option + "' , item14option2 = '" + bData[bID].item14option2 + "' , item14option3 = '" + bData[bID].item14 + "' , item14option4 = '" + bData[bID].item14option4 + "' , item14option5 = '" + bData[bID].item14option5.tostring() + "' , item14option6 = '" + bData[bID].item14option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item15")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item15 = '" + bData[bID].item15 + "' , item15type = '" + bData[bID].item15type + "' , item15option = '" + bData[bID].item15option + "' , item15option2 = '" + bData[bID].item15option2 + "' , item15option3 = '" + bData[bID].item15 + "' , item15option4 = '" + bData[bID].item15option4 + "' , item15option5 = '" + bData[bID].item15option5.tostring() + "' , item15option6 = '" + bData[bID].item15option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item16")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item16 = '" + bData[bID].item16 + "' , item16type = '" + bData[bID].item16type + "' , item16option = '" + bData[bID].item16option + "' , item16option2 = '" + bData[bID].item16option2 + "' , item16option3 = '" + bData[bID].item16 + "' , item16option4 = '" + bData[bID].item16option4 + "' , item16option5 = '" + bData[bID].item16option5.tostring() + "' , item16option6 = '" + bData[bID].item16option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item17")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item17 = '" + bData[bID].item17 + "' , item17type = '" + bData[bID].item17type + "' , item17option = '" + bData[bID].item17option + "' , item17option2 = '" + bData[bID].item17option2 + "' , item17option3 = '" + bData[bID].item17 + "' , item17option4 = '" + bData[bID].item17option4 + "' , item17option5 = '" + bData[bID].item17option5.tostring() + "' , item17option6 = '" + bData[bID].item17option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item18")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item18 = '" + bData[bID].item18 + "' , item18type = '" + bData[bID].item18type + "' , item18option = '" + bData[bID].item18option + "' , item18option2 = '" + bData[bID].item18option2 + "' , item18option3 = '" + bData[bID].item18 + "' , item18option4 = '" + bData[bID].item18option4 + "' , item18option5 = '" + bData[bID].item18option5.tostring() + "' , item18option6 = '" + bData[bID].item18option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item19")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item19 = '" + bData[bID].item19 + "' , item19type = '" + bData[bID].item19type + "' , item19option = '" + bData[bID].item19option + "' , item19option2 = '" + bData[bID].item19option2 + "' , item19option3 = '" + bData[bID].item19 + "' , item19option4 = '" + bData[bID].item19option4 + "' , item19option5 = '" + bData[bID].item19option5.tostring() + "' , item19option6 = '" + bData[bID].item19option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "item20")
	{
		string = "UPDATE " + MYSQL_IVMP_BUILDINGS + " SET item20 = '" + bData[bID].item20 + "' , item20type = '" + bData[bID].item20type + "' , item20option = '" + bData[bID].item20option + "' , item20option2 = '" + bData[bID].item20option2 + "' , item20option3 = '" + bData[bID].item20 + "' , item20option4 = '" + bData[bID].item20option4 + "' , item20option5 = '" + bData[bID].item20option5.tostring() + "' , item20option6 = '" + bData[bID].item20option6 + " WHERE ID = '" + dBID + "'";
		sql.query(string);
		return 1;
	}	
	log("[WARNING:] Unknown column name: " + column);
	return 1;
}
	
function saveFData(fID, column)
{
	local string;
	local dFID = fID + 1;
	if(column.tostring() == "name")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET name = '" + fData[fID].name.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rankCount")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rankCount = '" + fData[fID].rankCount.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank1")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank1 = '" + fData[fID].rank1.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank2")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank2 = '" + fData[fID].rank2.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank3")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank3 = '" + fData[fID].rank3.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank4")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank4 = '" + fData[fID].rank4.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank5")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank5 = '" + fData[fID].rank5.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank6")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank6 = '" + fData[fID].rank6.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank7")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank7 = '" + fData[fID].rank7.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank8")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank8 = '" + fData[fID].rank8.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank9")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank9 = '" + fData[fID].rank9.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank10")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank10 = '" + fData[fID].rank10.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank11")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank11 = '" + fData[fID].rank11.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank12")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank12 = '" + fData[fID].rank12.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank13")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank13 = '" + fData[fID].rank13.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank14")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank14 = '" + fData[fID].rank14.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank15")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank15 = '" + fData[fID].rank15.tostring() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank1reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank1reward = '" + fData[fID].rank1reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank2reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank2reward = '" + fData[fID].rank2reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank3reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank3reward = '" + fData[fID].rank3reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank4reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank4reward = '" + fData[fID].rank4reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank5reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank5reward = '" + fData[fID].rank5reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank6reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank6reward = '" + fData[fID].rank6reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank7reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank7reward = '" + fData[fID].rank7reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank8reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank8reward = '" + fData[fID].rank8reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank9reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank9reward = '" + fData[fID].rank9reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank10reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank10reward = '" + fData[fID].rank10reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank11reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank11reward = '" + fData[fID].rank11reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank12reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank12reward = '" + fData[fID].rank12reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank13reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank13reward = '" + fData[fID].rank13reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank14reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank14reward = '" + fData[fID].rank14reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "rank15reward")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET rank15reward = '" + fData[fID].rank15reward.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin1")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin1 = '" + fData[fID].skin1.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin2")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin2 = '" + fData[fID].skin2.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin3")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin3 = '" + fData[fID].skin3.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin4")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin4 = '" + fData[fID].skin4.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin5")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin5 = '" + fData[fID].skin5.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin6")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin6 = '" + fData[fID].skin6.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin7")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin7 = '" + fData[fID].skin7.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin8")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin8 = '" + fData[fID].skin8.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin9")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin9 = '" + fData[fID].skin9.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin10")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin10 = '" + fData[fID].skin10.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin11")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin11 = '" + fData[fID].skin11.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin12")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin12 = '" + fData[fID].skin12.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin13")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin13 = '" + fData[fID].skin13.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin14")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin14 = '" + fData[fID].skin14.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "skin15")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET skin15 = '" + fData[fID].skin15.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "useSkin")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET useSkin = '" + fData[fID].useSkin.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "joinRank")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET joinRank = '" + fData[fID].joinRank.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "type")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET type = '" + fData[fID].type.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "maxVehs")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET maxVehs = '" + fData[fID].maxVehs.tointeger() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "duty")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET dutyX = '" + fData[fID].dutyX.tofloat() + "' , dutyY = '" + fData[fID].dutyY.tofloat() + "' , dutyZ = '" + fData[fID].dutyZ.tofloat() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "duty2")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET duty2X = '" + fData[fID].duty2X.tofloat() + "' , duty2Y = '" + fData[fID].duty2Y.tofloat() + "' , duty2Z = '" + fData[fID].duty2Z.tofloat() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "duty3")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET duty3X = '" + fData[fID].duty3X.tofloat() + "' , duty3Y = '" + fData[fID].duty3Y.tofloat() + "' , duty3Z = '" + fData[fID].duty3Z.tofloat() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "duty4")
	{
		string = "UPDATE " + MYSQL_IVMP_FACTIONS + " SET duty4X = '" + fData[fID].duty4X.tofloat() + "' , duty4Y = '" + fData[fID].duty4Y.tofloat() + "' , duty4Z = '" + fData[fID].duty4Z.tofloat() + "' WHERE ID = '" + dFID + "'";
		sql.query(string);
		return 1;
	}
	log("[WARNING:] Unknown column name: " + column);
}	
	
function saveVehData(vehID, column)
{
	local string;
	if(column.tostring() == "model")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET model = '" + vehData[vehID].model.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "lights")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET lights = '" + vehData[vehID].lights.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "indicators")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET indicator1 = '" + vehData[vehID].indicator1.tointeger() + "' , indicator2 = '" + vehData[vehID].indicator2.tointeger() + "' , indicator3 = '" + vehData[vehID].indicator3.tointeger() + "' , indicator4 = '" + vehData[vehID].indicator4.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "sirenState")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET sirenState = '" + vehData[vehID].sirenState + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "cb")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET cb = '" + vehData[vehID].cb + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "cbOn")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET cbOn = '" + vehData[vehID].cbOn + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "cbChannel")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET cbChannel = '" + vehData[vehID].cbChannel + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "basic")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET posX = '" + vehData[vehID].posX.tofloat() + "' , posY = '" + vehData[vehID].posY.tofloat() + 
			"' , posZ = '" + vehData[vehID].posZ.tofloat() + "' , posAngle = '" + vehData[vehID].posAngle + "' , dirtLvl = '" + vehData[vehID].dirtLvl +
			"' , counter = '" + vehData[vehID].counter + "' , fuel = '" + vehData[vehID].fuel + "' , sirenState = '" + vehData[vehID].sirenState.tointeger() + "' , lights = '" + vehData[vehID].lights.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "pos")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET posX = '" + vehData[vehID].posX.tofloat() + "' , posY = '" + vehData[vehID].posY.tofloat() + "' , posZ = '" + vehData[vehID].posZ.tofloat() + "' , posAngle = '" + vehData[vehID].posAngle + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posX")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET posX = '" + vehData[vehID].posX.tofloat() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posY")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET posY = '" + vehData[vehID].posY.tofloat() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posZ")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET posZ = '" + vehData[vehID].posZ.tofloat() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "posAngle")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET posAngle = '" + vehData[vehID].posAngle.tofloat() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "color")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET color1 = '" + vehData[vehID].color1 + "' , color2 = '" + vehData[vehID].color2 + "' , color3 = '" + vehData[vehID].color3 + "' , color4 = '" + vehData[vehID].color4 + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "color1")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET color1 = '" + vehData[vehID].color1.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "color2")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET color2 = '" + vehData[vehID].color2.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "color3")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET color3 = '" + vehData[vehID].color3.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "color4")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET color4 = '" + vehData[vehID].color4.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "faction1")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET faction1 = '" + vehData[vehID].faction1.toiteger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "owned")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET owned = '" + vehData[vehID].owned.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "owner")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET owner = '" + vehData[vehID].owner.tostring() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "price")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET price = '" + vehData[vehID].price.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "engineOn")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET engineOn = '" + vehData[vehID].engineOn.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "serial")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET serial = '" + vehData[vehID].serial.tostring() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "lastDriver")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET lastDriver = '" + vehData[vehID].lastDriver.tostring() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "fuel")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET fuel = '" + vehData[vehID].fuel.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "fuelType")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET fuelType = '" + vehData[vehID].fuelType.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "dirtLvl")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET dirtLvl = '" + vehData[vehID].dirtLvl.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "counter")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET counter = '" + vehData[vehID].counter.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	if(column.tostring() == "locked")
	{
		string = "UPDATE LOW_PRIORITY " + MYSQL_IVMP_VEHICLES + " SET locked = '" + vehData[vehID].locked.tointeger() + "' WHERE ID_InGame = '" + vehData[vehID].id_inGame + "'";
		sql.query(string);
		return 1;
	}
	log("[WARNING:] Unknown column name: " + column);
	return 1;
}